package com.xyh.bean;

import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

/**
 * 表信息类，用于封装数据库表的元数据
 */
public class TableInfo {
    // 表名
    private String tableName;

    // 对应的Bean类名
    private String beanName;

    // Bean参数名
    private String beanParamName;

    // 表注释或描述
    private String comment;

    // 字段信息列表
    private List<FieldInfo> fieldList;

    //扩展字段信息
    private List<FieldInfo> extendFieldList;

    // 键或索引字段信息的映射，用于快速查找特定键或索引对应的字段信息
    private Map<String,List<FieldInfo>> keyIndexMap = new LinkedHashMap<>();

    // 标记是否包含日期类型字段
    private Boolean haveDate;

    // 标记是否包含日期时间类型字段
    private Boolean haveDateTime;

    // 标记是否包含BigDecimal类型字段
    private Boolean haveBigDecimal;

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public String getBeanName() {
        return beanName;
    }

    public void setBeanName(String beanName) {
        this.beanName = beanName;
    }

    public String getBeanParamName() {
        return beanParamName;
    }

    public void setBeanParamName(String beanParamName) {
        this.beanParamName = beanParamName;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public List<FieldInfo> getFieldList() {
        return fieldList;
    }

    public void setFieldList(List<FieldInfo> fieldList) {
        this.fieldList = fieldList;
    }

    public Map<String, List<FieldInfo>> getKeyIndexMap() {
        return keyIndexMap;
    }

    public void setKeyIndexMap(Map<String, List<FieldInfo>> keyIndexMap) {
        this.keyIndexMap = keyIndexMap;
    }

    public Boolean getHaveDate() {
        return haveDate;
    }

    public void setHaveDate(Boolean haveDate) {
        this.haveDate = haveDate;
    }

    public Boolean getHaveDateTime() {
        return haveDateTime;
    }

    public void setHaveDateTime(Boolean haveDateTime) {
        this.haveDateTime = haveDateTime;
    }

    public Boolean getHaveBigDecimal() {
        return haveBigDecimal;
    }

    public void setHaveBigDecimal(Boolean haveBigDecimal) {
        this.haveBigDecimal = haveBigDecimal;
    }

    public List<FieldInfo> getExtendFieldList() {
        return extendFieldList;
    }

    public void setExtendFieldList(List<FieldInfo> extendFieldList) {
        this.extendFieldList = extendFieldList;
    }
}
